package com.dong.sqltoy.service;

import com.dong.sqltoy.model.Order;
import com.sagframe.sagacity.sqltoy.plus.dao.SqlToyHelperDao;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 订单服务类
 * 
 * @author dong
 * @Date 2025/9/28
 */
@Service
public class OrderService {

    @Resource
    private SqlToyHelperDao sqlToyDao;

    public Object saveOrder(Order order) {
        return sqlToyDao.save(order);
    }

    public Order loadOrder(Order order) {
        return sqlToyDao.load(order);
    }

    public List<Order> loadAllOrders(List<Order> orders) {
        return sqlToyDao.loadAll(orders);
    }

    public Long update(Order order) {
        return sqlToyDao.update(order);
    }

    public Long delete(Order order) {
        return sqlToyDao.delete(order);
    }
}